<template>
	<view>
		<view class="mainpadding2">
			<view class="margin_top newsflex" @click="jumpurl('/pages/index/newsdetail?type=1')">
				<view class="flexleft">
					<view class="lefticon">
						<image src="@/static/news/news1.png" mode=""></image>
					</view>
					<view>
						<view class="titletext">政策发文</view>
						<view class="newstext xiankuan margin_top">{{newsAll.zcfwinfo.title}}</view>
					</view>
				</view>
				<view class="flexcolumnright">
					<view class="newstime">{{newsAll.zcfwinfo.createtime_text}}</view>
					<u-badge max="99" :value="newsAll.zcfw_noread_num"></u-badge>
				</view>
			</view>
			<view class="margin_top newsflex" @click="jumpurl('/pages/index/newsdetail?type=2')">
				<view class="flexleft">
					<view class="lefticon">
						<image src="@/static/news/news2.png" mode=""></image>
					</view>
					<view>
						<view class="titletext">公司制度</view>
						<view class="newstext xiankuan margin_top">{{newsAll.gszdinfo.title}}</view>
					</view>
				</view>
				<view class="flexcolumnright">
					<view class="newstime">{{newsAll.gszdinfo.createtime_text}}</view>
					<u-badge max="99" :value="newsAll.gszd_noread_num"></u-badge>
				</view>
			</view>
			<view class="margin_top newsflex" @click="jumpurl('/pages/index/newsdetail?type=3')">
				<view class="flexleft">
					<view class="lefticon">
						<image src="@/static/news/news3.png" mode=""></image>
					</view>
					<view>
						<view class="titletext">最新通知</view>
						<view class="newstext xiankuan margin_top">{{newsAll.zxtzinfo.title}}</view>
					</view>
				</view>
				<view class="flexcolumnright">
					<view class="newstime">{{newsAll.zxtzinfo.createtime_text}}</view>
					<u-badge max="99" :value="newsAll.zxtz_noread_num"></u-badge>
				</view>
			</view>
			<view class="margin_top newsflex" @click="jumpurl('/pages/index/newsdetail?type=4')">
				<view class="flexleft">
					<view class="lefticon">
						<image src="@/static/news/news4.png" mode=""></image>
					</view>
					<view>
						<view class="titletext">平台信息</view>
						<view class="newstext xiankuan margin_top">{{newsAll.ptxxinfo.title}}</view>
					</view>
				</view>
				<view class="flexcolumnright">
					<view class="newstime">{{newsAll.ptxxinfo.createtime_text}}</view>
					<u-badge max="99" :value="newsAll.ptxx_noread_num"></u-badge>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import httpRequest from '@/commonFun/httpRequest.js'
	export default {
		data() {
			return {
				newsAll:{}
			}
		},
		onShow() {
			this.getnews()
		},
		methods: {
			getnews(){
				httpRequest.request('/customapi/index/newsNoReadNum', 'POST', {}).then(res => {
					this.newsAll = res.data
				})
				
			},
			jumpurl(url) {
				uni.navigateTo({
					url
				})
			},
		}
	}
</script>

<style lang="scss" spoped>
// 信息
	.newsflex {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		padding: 30rpx 0;
		border-bottom: 1rpx solid rgba(0, 0, 0, 0.02);
	}

	.lefticon {
		width: 84rpx;
		height: 84rpx;
		min-width: 84rpx;
		max-width: 84rpx;
		margin-right: 20rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.newstext {
		font-size: 24rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		color: #666666;
		width: 300rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		line-height: 24rpx;
	}

	.newstime {
		font-size: 24rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		color: #999;
		line-height: 24rpx;
		margin-bottom: 30rpx;
	}

	.xiankuan {
		width: 300rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.flexcolumnright {
		display: flex;
		align-items: flex-end;
		flex-direction: column;
	}

</style>
